package com.laotou99.backjack.test;

public class Consumer implements Runnable {
	private Clerk clerk;
	public Consumer(Clerk clerk) {
		this.clerk = clerk;
	}

	@Override
	public void run() {
		System.out.println("consumer is get number....");
		for(int i=1;i<=10;i++){
			try {
				Thread.sleep((int)(Math.random()*3000));
			} catch (InterruptedException e) {
			 	e.printStackTrace();
			}
			int i1 = clerk.getProduct();
			System.out.println("i1-=>"+i1);
		}
	}

}
